<?php echo $this->Html->script('admin/modificar_tipus_curs'); ?>

<div class="row">
	<div class="col-md-12">
		<div class="box box-warning">
								<div class="box-header">
									<i class="ion ion-clipboard"></i>
                                    <h3 class="box-title">Escollir tipus de curs</h3>
								</div>
                                <div class="box-body">
									   <select class="form-control " onClick="javascript:select_categoria_curs(this.value);" id="select_categoria_curs">
									      <?php foreach($categorias as $categoria){?>
									         <option class="col-md-6" value="<?php echo($categoria->id);?>"><?php echo($categoria->nom.' - '.strtoupper($categoria->area));?> </option>
									      <?php }?>
									   </select>
                                </div><!-- /.box-body -->
                            </div><!-- /.box -->
	</div>
</div>


<div class="row">
	<div class="col-md-12">
         <div class="nav-tabs-custom">
                                <ul class="nav nav-tabs">
                                    <li class="active"><a href="#tab_1" data-toggle="tab">Català</a></li>
                                    <li><a href="#tab_2" data-toggle="tab">Castellà</a></li>
                                    <li class="pull-right"><a href="#" class="text-muted"><i class="fa fa-gear"></i></a></li>
                                </ul>
                                <div class="tab-content">
                                    <div class="tab-pane active" id="tab_1">
                                        
                                        
                                        <div class="box " style="border:none;">

							                                <div class="box-body" >
							                                	<dl class="dl-horizontal">
							                                        <dt>Modificar nom</dt>
							                                        <dd>A description list is perfect for defining terms.</dd>
							                                        <dt>Eliminar</dt>
							                                        <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
							                                    </dl>
							                                    <ul class="todo-list" id="listado_tipus_curs_cat" >
							
							                                    </ul>
							                                </div><!-- /.box-body -->
							                                <div class="box-footer clearfix no-border">
							                              	    <button class="btn btn-default pull-left" onclick="javascript:canvi_ordre('cat');" >
							                                    	<i class="fa fa-plus" ></i> Canviar ordre
							                                    </button>
							                                    <button class="btn btn-default pull-right" id="afegir_tipus_curs_cat">
							                                    	<i class="fa fa-plus" ></i> Afegir nou
							                                    </button>
							                                </div>
							        	 </div><!-- /.box -->
                                    </div>
  
                                    <div class="tab-pane" id="tab_2">
                                        
                                        <div class="box " style="border:none">

							                                <div class="box-body">
							                                	<dl class="dl-horizontal">
							                                        <dt>Modificar nom</dt>
							                                        <dd>A description list is perfect for defining terms.</dd>
							                                        <dt>Eliminar</dt>
							                                        <dd>Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.</dd>
							                                    </dl>
							                                    <ul class="todo-list" id="listado_tipus_curs_es" >
							
							                                    </ul>
							                                </div><!-- /.box-body -->
							                                <div class="box-footer clearfix no-border">
							                               	 	<button class="btn btn-default pull-left" onclick="javascript:canvi_ordre('es');" >
							                                    	<i class="fa fa-plus" ></i> Canviar ordre
							                                    </button>
							                                    <button class="btn btn-default pull-right" id="afegir_tipus_curs_es" >
							                                    	<i class="fa fa-plus" ></i> Afegir nou
							                                    </button>
							                                </div>
							        	 </div><!-- /.box -->
                                        
                                        
                                        
                                        
                                        
                                    </div><!-- /.tab-pane -->
                                </div><!-- /.tab-content -->
                            </div><!-- nav-tabs-custom -->
	</div>


</div>




<!-- AFEGIR NOU CURS -->

      <!-- COMPOSE MESSAGE MODAL -->
        <div class="modal fade" id="dialog_nou_tipus_curs" tabindex="-1" role="dialog" aria-hidden="true" style="margin-top:5em;">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Afegir nou tipus de curs</h4>
                    </div>
                    <form action="#" method="post">
                        <div class="modal-body">
                            <div class="form-group">
                                <div class="input-group">
                                    <span class="input-group-addon">Nom</span>
                                    <input name="nou_nom_tipus_curs" id="nom_nou_tipus_curs" type="text" class="form-control input_nou_nom_tipus_curs" >
                                </div>
                            </div>
                        </div>
                        <div class="modal-footer clearfix">
                        
                        	<button type="button" class="btn btn-primary buton_afegir_nou_tipus_curs" onclick="javascrip:nou_tipus_curs(this.id);"><i ></i>Afegir</button>
                            <button type="button" class="btn btn-danger pull-left" data-dismiss="modal"><i ></i>Descartar</button>
                        </div>
                    </form>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->



        
        
        
<div class="modal fade" id="modificar_tipus_curs" tabindex="-1" role="dialog" aria-hidden="true" style="margin-top:5em; overflow:hidden;"></div>




<!-- DIALOG ELIMINAR CATEGORIA -->
        
        <div class="modal fade" id="dialog_eliminar_categoria_curs" tabindex="-1" role="dialog" aria-hidden="true" style="margin-top:5em;">
            <div class="modal-dialog">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                        <h4 class="modal-title">Eliminar tipus curs</h4>
                    </div>
                    <div class="modal-body">
                            
      					<h3>Realment vols eliminar <i id="nom_tipus_curs_eliminar"></i> ? </h1>
                            
                   </div>
                   <div class="modal-footer clearfix">
	                     <button type="button" id="boton_eliminar_tipus_curs" class="btn btn-primary "><i ></i>Eliminar</button>
	                     <button type="button" class="btn btn-danger pull-left" data-dismiss="modal"><i ></i>Descartar</button>
	                </div>
                </div><!-- /.modal-content -->
            </div><!-- /.modal-dialog -->
        </div><!-- /.modal -->	

        
        <script>
       		select_categoria_curs($("#select_categoria_curs").val());
       		$( "#afegir_tipus_curs_cat" ).click(function() {
       			dialog_nou_tipus_curs('cat')
       		});

       		$( "#afegir_tipus_curs_es" ).click(function() {
       			dialog_nou_tipus_curs('es')
       		});


       		$("#listado_tipus_curs_cat").blur(function() {
       		  alert('hola');
       		});





       		       		
       </script>
